﻿namespace etracks.Web
{
    using etracks.EntityModels;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;

    /// <summary>
    /// List ViewModel for EnvironmentResource
    /// </summary>
    public class EnvironmentResourceListViewModel : etracks.EntityModels.Environment
    {
        public List<etracks.Web.ResourceReadOnlyViewModel> ResourceList { get; set; }

        /// <summary>
        /// Constructor
        /// </summary>
        public EnvironmentResourceListViewModel()
        {
            this.ResourceList = new List<etracks.Web.ResourceReadOnlyViewModel>();

        } // public EnvironmentResourceListViewModel()

        public override void SetValuesFrom(object source)
        {
            etracks.EntityModels.Environment src = source as etracks.EntityModels.Environment;

            if (src != null)
            {
                this.Id = src.Id;
                this.Name = src.Name;
                this.ProjectId = src.ProjectId;
            }
        }


    } // public class EnvironmentResourceListViewModel : etracks.EntityModels.Environment

} // namespace etracks.Web